<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/taglibs.jsp"%>

<form action="${ctx}/sys/user/add" method="post">
    <table>
        <tbody>
            <tr>
                <td><label for="addform-id">用户ID</label></td>
                <td><input type="text" id="addform-id" name="id" class="easyui-textbox"
                        data-options="validType:'length[0,32]', prompt:'不输入时会自动生成'"/>
                </td>
            </tr>
            <tr>
                <td><label for="addform-loginAct">登录名</label></td>
                <td><input type="text" id="addform-loginAct" name="loginAct" class="easyui-textbox"
                        data-options="required:true"/>
                </td>
            </tr>
            <tr>
                <td><label for="addform-loginPwd">密码</label></td>
                <td><input type="text" id="addform-loginPwd" name="loginPwd" class="easyui-textbox"
                        data-options="required:true"/>
                </td>
            </tr>
            <tr>
                <td><label for="addform-personId">人员</label></td>
                <td><input type="text" id="addform-personId" name="personId"/></td>
            </tr>
        </tbody>
    </table>
</form>

<script type="text/javascript">
$(function() {
    var $personId = $('#addform-personId');
    $personId.combogrid({
        url: ctx + '/sys/person/persons-like-name',
        mode: 'remote',
        idField: 'id',
        textField: 'name',
        rownumbers: true,
        fitColumns: true,
        panelWidth: 300,
        columns: [[
            {title: '人员ID', field: 'id', sortable: true, width: 100},
            {title: '人员名称', field: 'name', sortable: true, width: 100}
        ]]
    });
})
</script>